﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.Text;
using System.Threading.Tasks;

namespace Core.ECS.Components
{
    [DataContract]
    public class CHierarchy : IComponent
    {
        public Guid? ParentId => _parentId;
        public List<Guid> Children => _children;
        public Guid Id
        {
            get => _id; set => _id = value;
        }
        [DataMember]
        private Guid _id;
        [DataMember]
        private Guid? _parentId;
        [DataMember]
        private List<Guid> _children;
        public CHierarchy(Guid id)
        {
            _id = id;
            _parentId = null;
            _children = new List<Guid>();
        }
    }
}
